
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2023-08-22
 * Time: 9:52
 */


//@TestMethodOrder(MethodOrderer.OrderAnnotation.class) // 指定顺序执行
@TestMethodOrder(MethodOrderer.Random.class)// JUnit 随机的执行顺序
public class TestJUnit2 {

    @Test
    @Order(2)
    void A() {
        System.out.println("A");
    }


    @Test
    @Order(1)
    void B() {
        System.out.println("B");
    }

    @Test
    @Order(3)
    void C() {
        System.out.println("C");
    }

}

